# Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>

pkgname=robin-map
pkgver=1.2.1
pkgrel=1
pkgdesc="C++ implementation of a fast hash map and hash set using robin hood hashing"
arch=(loong64 x86_64)
url="https://github.com/Tessil/robin-map"
license=('MIT')
makedepends=('cmake')
source=("$pkgname-$pkgver.tar.gz::https://github.com/Tessil/robin-map/archive/v${pkgver}.tar.gz")
sha512sums=('9e08c6b5b06d26e18d85b36c79ec855bc3220843bc358f53f3eb269bd8d20350871a9686ad77b2b462ca104e4cc62a0745a71d62bd1f69c8f50d29788eac63e1')

build() {
  cd $pkgname-$pkgver

  cmake . \
      -Bbuild \
      -DCMAKE_INSTALL_PREFIX=/usr
  make -C build
}

package() {
  cd $pkgname-$pkgver

  DESTDIR="$pkgdir" make -C build install

  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
